<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="niddles" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<link href="../boot/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="../jq/jquery-3.0.0.js"></script>
<script src="../boot/dist/js/bootstrap.min.js"></script>
<head>
    <title>查询全部书籍</title>
</head>
<body>

<a class="btn btn-primary" role="button" href="${pageContext.request.contextPath}/book/toaddBook">新增书籍</a>
<a class="btn btn-success" role="button" href="${pageContext.request.contextPath}/book/allBooks">显示全部书籍</a>
<div  class="pull-right">
    <form action="${pageContext.request.contextPath}/book/queryBook" method="post">
        <input type="text" name="queryBookName" placeholder="请输入您要查询的书名"> &nbsp;
        <input type="submit" value="查询书名查" class="btn btn-info">
    </form>
</div>
<div>
    <table class="table table-striped">
        <thead>
        <tr>
            <th>Id</th>
            <th>书名</th>
            <th>数量</th>
            <th>描述</th>
            <th>操作</th>
        </tr>
        <niddles:forEach items="${list}" var="list">
            <tr>
                <td class="active">${list.bookID}</td>
                <td class="success">${list.bookName}</td>
                <td class="warning">${list.bookCounts}</td>
                <td class="danger">${list.detail}</td>
                <td>
                    <a class="btn btn-danger btn-sm" role="button" href="${pageContext.request.contextPath}/book/deleteBook/${list.bookID}">删除</a>
                    &nbsp;&nbsp;
                    <a class="btn btn-warning btn-sm" role="button" href="${pageContext.request.contextPath}/book/toupdateBook?id=${list.bookID}">更新</a>
                    &nbsp;
                    <a class="btn btn-default btn-sm" role="button" href="#">订阅</a>
                    &nbsp;
                    <a class="btn btn-default btn-sm" role="button" href="#">预定</a>
                </td>
            </tr>
        </niddles:forEach>
        </thead>
    </table>
</div>
</body>
</html>
